package com.eastfair.venueservice.service;

import com.eastfair.boot.service.SuperService;
import com.eastfair.venueservice.dto.ViolationFineDTO;
import com.eastfair.venueservice.entity.ViolationFine;
import com.eastfair.venueservice.entity.ViolationRecord;
import com.eastfair.venueservice.enumeration.ViolationFineRefundPathEnum;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 违规罚款记录
 * </p>
 *
 * @author dqq
 * @date 2023-04-25
 */
public interface ViolationFineService extends SuperService<ViolationFine> {

    /**
     * 查询违规罚款记录.
     *
     * @param query the query
     * @return the list
     */
    List<ViolationFine> listViolationFine(ViolationFineDTO query);

    /**
     * 违规记录ID查询违规扣记录.
     *
     * @param violationId the violation id
     * @return the list
     */
    List<ViolationFine> listByViolationId(Long violationId);

    /**
     * 保证金订单编号查询违规扣款记录.
     *
     * @param bondOrderNumber the order number
     * @return the list
     */
    List<ViolationFine> listByBondOrderNumber(String bondOrderNumber);

    /**
     * 保证金订单编号列表查询违规扣款记录.
     *
     * @param bondOrderNumberList the bond order number list
     * @return the list
     */
    List<ViolationFine> listByBondOrderNumberList(List<String> bondOrderNumberList);

    /**
     * 展商ID查询违规扣款记录.
     *
     * @param exhibitorId the exhibitor id
     * @return the list
     */
    @Deprecated
    List<ViolationFine> listByExhibitorId(Long exhibitorId);

    /**
     * 展商ID查询为扣除保证金的违规扣款记录
     *
     * @param exhibitorId the exhibitor id
     * @return the list
     */
    List<ViolationFine> listNotDeductByExhibitorId(Long exhibitorId);

    /**
     * 展会ID，服务商ID查询未扣除保证金的违规扣款记录.
     *
     * @param exhibitionManageId the exhibition manage id
     * @param serviceProviderId  the service provider id
     * @return the list
     */
    List<ViolationFine> listNotDeductByExhibitionManageId(Long exhibitionManageId, Long serviceProviderId);

    /**
     * 违规记录ID列表查询违规扣款记录
     *
     * @param violationIdList the violation id list
     * @return the list
     */
    List<ViolationFine> listNotDeductByViolationIdList(List<Long> violationIdList);

    /**
     * 保存违规罚款记录.
     *
     * @param violationFineDTO the violation fine dto
     * @return the boolean
     */
    boolean saveViolationFine(ViolationFineDTO violationFineDTO);

    /**
     * 场馆下发的违规记录扣款生成扣款记录.
     *
     * @param violationRecord the violation record
     * @return the boolean
     */
    boolean saveByVenueViolationRecord(ViolationRecord violationRecord);

    /**
     * 主场下发的违规记录扣款生成扣款记录.
     *
     * @param violationRecord the violation record dto
     * @return the boolean
     */
    boolean saveByHomeViolationRecord(ViolationRecord violationRecord);

    /**
     * 撤销违规记录之后撤销违规罚款记录.
     *
     * @param violationRecord the violation record
     * @return the boolean
     */
    boolean cancelByViolationRecord(ViolationRecord violationRecord);

    /**
     * 取消保证金订单之后撤销违规罚款记录
     *
     * @param bondOrderNumber the bond order number
     * @return the boolean
     */
    boolean cancelByBondOrderNumber(String bondOrderNumber);

    /**
     * 取消保证金订单之后撤销违规罚款记录
     *
     * @param bondOrderNumberList the bond order number
     * @return the boolean
     */
    boolean cancelByBondOrderNumberList(List<String> bondOrderNumberList);

    /**
     * 场馆保证金更新违规扣款记录的保证金订单编号
     *
     * @param exhibitionManageId the exhibition manage id
     * @param serviceProviderId  the service provider id
     * @param bondOrderNumber    the bond order number
     * @return the boolean
     */
    boolean updateVenueBondOrderNumber(Long exhibitionManageId, Long serviceProviderId, String bondOrderNumber);

    /**
     * 主场保证金更新违规扣款记录的保证金订单编号
     *
     * @param exhibitorId     the exhibitor id
     * @param bondOrderNumber the bond order number
     * @return the boolean
     */
    boolean updateHomeBondOrderNumber(Long exhibitorId, String bondOrderNumber);

    /**
     * 更新保证金订单编号
     *
     * @param violationFineList the violation fine list
     * @param bondOrderNumber   the bond order number
     * @return the boolean
     */
    boolean updateBondOrderNumber(List<ViolationFine> violationFineList, String bondOrderNumber);

    /**
     * 更新为已退款.
     *
     * @param id         the id
     * @param refundPath the refund path
     * @return the boolean
     */
    @Deprecated
    boolean updateIsRefund(Long id, ViolationFineRefundPathEnum refundPath);

    /**
     * 移除违规罚款记录.
     *
     * @param violationId the violation id
     * @return the boolean
     */
    boolean removeByViolationId(Long violationId);

    /**
     * id移除违规罚款记录.
     *
     * @param id the id
     * @return the boolean
     */
    boolean removeById(Long id);
}
